package com.chris.vue.models.result;

import com.chris.vue.models.items.MenuInfoItem;
import com.chris.vue.models.items.MenuItem;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Arrays;
import java.util.List;

/**
 * Created by Chris Chan
 * 2020/8/13 8:14
 * Use for:
 * Explain:
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserInfoResult {
    private String username;
    private String icon;
    private int age;
    private List<String> roles;
    private List<MenuItem> menus;
    private List<MenuInfoItem> menuInfos;

    public UserInfoResult(String username, String icon, int age, List<MenuItem> menus, List<MenuInfoItem> menuInfos, String... roles) {
        this.username = username;
        this.icon = icon;
        this.age = age;
        this.menus = menus;
        this.menuInfos = menuInfos;
        this.roles = Arrays.asList(roles);
    }
}
